package com.journalshow.backend.service.impl;

import com.journalshow.backend.dao.JournalDao;
import com.journalshow.backend.domain.Journal;
import com.journalshow.backend.domain.JournalDB;
import com.journalshow.backend.service.JournalService;
import org.springframework.beans.factory.annotation.Autowired;

public class JournalServiceImpl implements JournalService {
    @Autowired
    private JournalDao journalDao;

    @Override
    public int createJournal(Journal journal) {
        JournalDB journalDB = new JournalDB();
        journalDB.setId(journal.getId());
        journalDB.setDescribe(journal.getDescribe());
        int res = journalDao.insert(journalDB);
        return res;
    }

    @Override
    public int deleteJournal(String id) {
        return 0;
    }

    @Override
    public int alterJournal(String id, Journal journal) {
        return 0;
    }

    @Override
    public Journal getJournal(String id) {
        return null;
    }
}
